package base.bfs;

public class Test {
    public static void main(String[] args) {
        int m = 100;
        int n = 1;
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                int r = getIndex(i, j, n) / n;
                int c = getIndex(i, j, n) % n;
                if (r != i || c != j) {
                    System.out.println("x = " + i + ", j = " + j);
                    System.out.println("r = " + r + ", c = " + c);
                    return;
                }
            }
        }
        System.out.println("Yes!!!");
    }

    public static int getIndex(int x, int y, int n) {
        return x * n + y;
    }
}
